var prefManager = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var _search = this;
_search._result = null;
var search_result = {values: null, comments: null};
var searchAutoCompleteResult = null;
autoCompleteObserver =
{
onSearchResult: function(search, result)
{
_search._result = result;
listener.onSearchResult(_search, new SearchAutoCompleteResult(result, search_result, prefManager.getIntPref("extensions.smarterwiki.num_urlbar_from_history")));